const numbers: number[] = [1, 2, 3, 4, 5]

const hobbies: string[] = ['eating', 'sleeping', 'coding']

const ids: Array<number> = [101, 202, 303]

const names: Array<string> = ['Henry', 'Alice', 'Bob']

const mixedArray: (number | string)[] = [1, 'two', 3, 'four']

const args: number | string[] = 10

//复杂类型: 二维数组
const matrix: number[][] = [
  [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]
]
const matrix2: Array<Array<number>> = [
  [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]
]

//复杂类型: 数组对象
const person: { id: number; name: string }[] = [{ id: 101, name: 'Henry' }]

// 结合type
type typePerson = {
  id: number
  name: string
  age: number
}
const perosn1: typePerson[] = [{ id: 102, name: 'Bob', age: 20 }]

// 结合interface
interface IPerson {
  id: number
  name: string
  age: number
}
const person2: IPerson[] = [{ id: 103, name: 'Alice', age: 22 }]

export {}
